TEMPLATE = app
CONFIG += console c++11
CONFIG -= app_bundle
CONFIG -= qt

GLFW_LIB_DIR = 'D:/GLFW/3.3.4'
GLM_LIB_DIR = 'D:/GLM'
Vulkan_LIB_DIR = 'D:/VulkanSDK/1.2.198.1'
STD_LIB_DIR = './stb'

INCLUDEPATH += $${GLFW_LIB_DIR}/include \
                $${GLM_LIB_DIR}/  \
                $${Vulkan_LIB_DIR}/include \
                $${STD_LIB_DIR}/


LIBS += $${GLFW_LIB_DIR}/lib-vc2017/glfw3.lib \
        $${Vulkan_LIB_DIR}/Lib/vulkan-1.lib

win32{
LIBS += -luser32 -lshell32 -lgdi32
}

SOURCES += \
        HelloTriangleApplication.cpp \
        main.cpp

HEADERS += \
    HelloTriangleApplication.h

# compile sharder command
win32{
#    system(copy /Y 1.png $${replace(OUT_PWD,/,\\)})
glslcpath = $${Vulkan_LIB_DIR}/Bin/glslc.exe
texelimgfile = texture.jpg
system($$system_path("$${glslcpath}") $$system_path("$${PWD}/shader.vert") -o $$system_path("$${OUT_PWD}/vert.spv"))
system($$system_path("$${glslcpath}") $$system_path("$${PWD}/shader.frag") -o $$system_path("$${OUT_PWD}/frag.spv"))
SPV_FILEDIR_DEF = SPV_FILEDIR=\\\"$$replace(OUT_PWD,/,\\\\)\\\"
system(copy /Y $$system_path("$${PWD}/$${texelimgfile}") $$system_path("$${OUT_PWD}/"))
DEFINES += $$SPV_FILEDIR_DEF
#message($$DEFINES)
}

DISTFILES += \
    shader.frag \
    shader.vert
